```typescript index.ts
import { Ably } from 'ably-platform-typescript-sdk';

const ably = new Ably({
    // Basic Authentication using an [API key](https://www.ably.io/documentation/core-features/authentication#basic-authentication).
    username: "USERNAME",
    password: "PASSWORD",
    // Token Authentication using an [Ably Token](https://www.ably.io/documentation/core-features/authentication#basic-authentication), or optionally an [Ably JWT](https://www.ably.io/documentation/core-features/authentication#ably-jwt-process).
    bearerAuth: "BEARER_AUTH"
})
```